<template>
	<view class="bus">
		<view class="b1">
			<text>{{detail.name}}</text>
			<view class="b2">
				<text>{{detail.first}}——</text>
				<text>{{detail.end}}</text>
			</view>
			<text>票价：{{detail.price}}元</text>
			<text>里程：{{detail.mileage}}公里</text>
			<u-button type="primary" text="下一步" style="width: 100px; margin-bottom: 10px;" @click="tonext"></u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				detail:{}
			}
		},
		onLoad(options) {
			this.id=options.id
			this.getdetail()
		},
		methods: {
			getdetail(){
				this.api.get('/prod-api/api/bus/line/'+this.id).then(res=>{
					this.detail=res.data.data
				})
			},
			tonext(){
				uni.navigateTo({
					url:'/pages/serve/bus/busdate/busdate?id='+this.id
				})
			}
		}
	}
</script>

<style lang="scss">
.b1{
	text-align: center;
	line-height: 30px;
	width: 180px;
	margin: 20px auto;
	display: flex;
	flex-direction: column;
	border: 2px solid blue;
}

</style>
